<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TinyButStrong</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
function ChangeUrl(mode,expl) {

  var pref = window.parent.location.pathname
  var page = ""
  var noresult = 0

	if (mode=="") {
	  mode = GetValRadio(window.parent.frames["action"].window.document.frm_select.opt_action)
	} else {
		SetValRadio(window.parent.frames["action"].window.document.frm_select.opt_action,mode)
	}
	if (expl=="") {
	  expl = GetValRadio(window.parent.frames["example"].window.document.frm_select.opt_example)
	} else {
		SetValRadio(window.parent.frames["example"].window.document.frm_select.opt_example,expl)
	}
	
	if (expl=="data") {
	  expl=window.parent.frames["example"].window.document.frm_select.lst_data.value
		if ((expl!="dataarray") && (expl!="datamysql") && (expl!="datanum"))  {
			noresult = 1
		} ;
	} ;
	
	
	//Retrive the prefixe of the current page
	pref = pref.substr(pref.lastIndexOf("/")+1)
	pref = pref.substr(pref.lastIndexOf("\\")+1)
	pref = pref.substr(0,pref.lastIndexOf("."))
  //Get the page name
  if (expl=="") {
	  mode = ""
		page = pref + "_0welcome.htm"
	}
	if (mode=="template") {
		if (window.parent.frames["action"].window.document.frm_select.chk_source.checked) {
	    page = pref + "_0view.php?script=" + expl + ".htm"
		} else {
	    page = pref + "_" + expl + ".htm"
		}
	}
	if (mode=="script") {
    page = pref + "_0view.php?script=" + expl + ".php"
	}
	if (mode=="result") {
	  if (noresult==1) {
		  page = pref + "_0noresult.htm"
		} else {
      page = pref + "_" + expl + ".php"
		}
	}
  //Change the URL
	window.parent.result.location = page
	
}
//This function returns the value of the selected radio item
function GetValRadio(radio) {
  var x = ""
  for (var i=0; i<radio.length;i++) {
    if (radio[i].checked) {
			x = radio[i].value
		}
  }
  return x
}
function SetValRadio(radio,newvalue) {
  var x = ""
  for (var i=0; i<radio.length;i++) {
		if (radio[i].value==newvalue) {
		  radio[i].checked = true
		} else {
		  radio[i].checked = false
    }		
  }
  return x
}
</SCRIPT>
<link href="tbs_us_examples_0styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 5px;
}
-->
</style>
</head>
<body topmargin="5" marginheight="0"  class="back-special2">
<form action="" method="post" name="frm_select">
  <span class="text-mini"><a href="tbs_us_examples_0welcome.htm" target="result">Help for Examples</a>
  <br>
  </a></span>
  <table width="200" cellpadding="1" cellspacing="0" class="borders01">
    <tr>
      <td class="borders01">Display:</td>
    </tr>
    <tr>
      <td class="borders01"><table width="100%" border="0" cellpadding="1" cellspacing="0">
          <tr>
            <td width="20"><input name="opt_action" type="radio" onClick="javascript:ChangeUrl('','')" value="result" checked></td>
            <td>Result</td>
          </tr>
          <tr>
            <td><input name="opt_action" type="radio" value="template" onClick="javascript:ChangeUrl('','')">
            </td>
            <td>Html Template
              <input type="checkbox" name="chk_source" id="chk_source" value="1" onClick="javascript:ChangeUrl('template','')">
              Source</td>
          </tr>
          <tr>
            <td><input type="radio" name="opt_action"  value="script" onClick="javascript:ChangeUrl('','')"></td>
            <td>PHP program</td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>
